import { articlrGetChannelList } from "../apis/article"
import { useEffect, useState } from "react"
const useChannel = () => {
  const [channelList, setChannelList] = useState([])
  useEffect(() => {
    // 获取频道列表数据
    const getChannelList = async () => {
      const res = await articlrGetChannelList()
      setChannelList(res.data.data.channels)
    }
    getChannelList()
  }, [])

  return {
    channelList
  }
}
export {
  useChannel
}